4 # IMPORTANT: Use the following statement at the TOP OF EVERY TEST SCRIPT
5 # to ensure that this package's 'bin/' subfolder is added to the path so that
6 # this package's CLIs can be invoked by their mere filename in the rest
9 PATH
=${PWD%%/test*}/bin
:$PATH
11 # Helper function for error reporting.
12 die
() { (( $# > 0 )) && echo "ERROR: $*" >&2; exit 1; }
14 out
=$
(whichpm File
::Spec
) || die
# should succeed
16 pathFragment
='/File/Spec.pm'
17 [[ $out =~
"$pathFragment"$
]] || die
"Expected '$pathFragment' in output."
19 # -- With -v, look for core-status indicator
21 coreStatusIndicator
='core>='
22 whichpm
-v File
::Spec |
grep -Fq $
'\t'"$coreStatusIndicator" || die
"Expected core-status indicator '$coreStatusIndicator' in output."